package com.example.module_car.ui

import com.example.module_car.api.CarApiService
import com.example.module_car.api.MotorCircleNetModule
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject


class CarRepository @Inject constructor(){
    @Inject
    @MotorCircleNetModule.NoticeApi
    lateinit var apiService: CarApiService

    fun getQueryCarList(id : Int) = flow {
        emit(apiService.getQueryCarList(id))
    }.flowOn(Dispatchers.IO)

}